<!--conf
<sample in_favorites="true">
              <product version="1.4" edition="pro"/>
                     <modifications>
                            <modified date="070101"/>
                     </modifications>
               <sampledescription><![CDATA[Table views splitted in scrollable parts are useful for displaying data where some part should stay visible while the other part is scrolled.]]></sampledescription></sample>
 --> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Grid in split mode</title>
	
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
</head>
<body>
	<h1>Grid in split mode</h1>
    <p>Using split mode allows you to have grid separated into two parts with independent horizontal scrolling.</p>
	<div id="gridbox" style="width:600px;height:260px;background-color:white;"></div>
	<br />
	<div><a href="#" onClick="mygrid.selectRow(this.nextSibling.value)">Select row</a><input id="" type="text" value="2"/></div>
	<div><a href="javascript:void(0)" onClick="mygrid.addRow((new Date()).valueOf(), ['new','new','new'], 2)">Add row</a></div>
	<div><a href="#" onClick="mygrid.deleteRow(mygrid.getSelectedId())">Delete selected row</a></div>
	<div><a href="#" onClick="doSerialize()">Serialize</a></div>
	<div><a href="#" onClick="mygrid.clearAll();">Clear all</a></div>
	<div><a href="#" onClick="mygrid.loadXML('../common/grid.xml')">Load XML</a></div>
	<div><a href="#" onClick="mygrid.cells(mygrid.getSelectedId(),this.nextSibling.value).setValue('new value');">Cells : setValue for selected row, column index:</a><input id="" type="text" value="1"/></div>
<script>
    function doSerialize(){
        mygrid.setSerializationLevel(false,false,false);
        document.getElementById("alfa1").innerHTML=mygrid.serialize().replace(/\</g,"&lt;").replace(/\>/g,"&gt;").replace(/\&lt;row/g,"<br/>&lt;row");
    }

    mygrid = new dhtmlXGridObject('gridbox');
	mygrid.setImagePath("../../../codebase/imgs/");
	mygrid.setHeader("Sales,Book Title,Author,Price,In Store,Shipping,Bestseller,Date of Publication");
	mygrid.setInitWidths("50,150,120,80,80,80,80,200")
	mygrid.setColAlign("right,left,left,right,center,left,center,center")
	mygrid.setColTypes("dyn,ed,ed,price,ch,co,ra,ro");
    mygrid.getCombo(5).put(2,2);
	mygrid.setColSorting("int,str,str,int,str,str,str,date")
	mygrid.init();
	mygrid.setSkin("dhx_skyblue");
    mygrid.splitAt(2);	
	mygrid.loadXML("../common/grid.xml");

</script>

<div id="alfa1"></div>

</body>
</html>
